package com.twitter.finagle.example.thrift

import com.twitter.finagle.Thrift
import com.laysakura.HelloService
import com.twitter.util.{Await, Future}

object HelloServiceThriftServer {
  def main(args: Array[String]): Unit = {
    //#thriftserverapi
    val server = Thrift.server.serveIface("127.0.0.1:9999", new HelloService[Future] {


      override def sayHelloTo(name: String): Future[String] = {
        System.out.println ("implement hi"+name)
        return Future.value("hi "+name)
      }
    })
    Await.ready(server)
    //#thriftserverapi
  }
}



